/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package p1gu;

import java.awt.Graphics2D;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;

/**
 *
 * @author Michael
 */
public class Meteorite {

    /**
     * x and y coordinates. Where to draw the animation on the screen?
     */
    public Animation meteorite;

    public Meteorite(int x, int y) {

        try {
            meteorite = new Animation(ImageIO.read(getClass().getResource("resources/images/meteorite.png")), 64, 64, 4, 100, true, 0, 0, 0);
        } catch (IOException ex) {
            Logger.getLogger(Meteorite.class.getName()).log(Level.SEVERE, null, ex);
        }

        meteorite.x = x;
        meteorite.y = y;
    }

    public void draw(Graphics2D g2d) {
        meteorite.Draw(g2d);
    }
}